<!DOCTYPE html>
<!-- TODO: review -->
<?php
  if (preg_match('/^[http|https]+[:\/\/]+[A-Za-z0-9\-_]+\\.+[#~A-Za-z0-9\.\/%&=\?\-_:\+]+$/i',$_GET['url'])) {
    $url = htmlentities($_GET['url']);
  }
?>
<html lang="en">
  <meta charset="utf-8">
  <title>Semantics Check</title>
  <script src="http://www.google.com/js/twisties.js"></script>
  <body>
    <h1>TODO Semantics Check</h1>
    <form action="index.php5">
      <fieldset>
        <label>URL: <input type="text" name="url" value="<?php echo $url; ?>" autofocus></label> <input type="submit" value="Check">
      </fieldset>
    </form>
<?php include 'check.php5'; ?>
    <script>
      var twisties = new goog.ui.Twisties( {
        enableFade: true,
        classTwisty: 'twisty',
        classCollapse: 'twistyExpand',
        classExpand: 'twistyCollapse',
        twistyTag: 'p'
      } );
    </script>